package com.ford.trade.service.impl;

import com.ford.trade.entity.AoKeOdds3;
import com.ford.trade.repository.Odds3Repository;
import com.ford.trade.service.Odds3Service;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: ford
 * @date: 2022/4/25 12:03
 */
@Service
public class Odds3ServiceImpl implements Odds3Service {
    @Resource
    private Odds3Repository odds3Repository;

    @Override
    public void save(AoKeOdds3 aoKeOdds) {
        odds3Repository.save(aoKeOdds);
    }

    @Override
    public void saveBatch(List<AoKeOdds3> aoKeOdds3s) {
        odds3Repository.saveAll(aoKeOdds3s);
    }

    @Override
    public List<AoKeOdds3> findByIndexId(Long indexId) {

        return odds3Repository.findAllByIndexId(indexId);
    }
}
